﻿using DFGK_WMS.Model.Dto;
using DFGK_WMS.Model.Exports;
using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK.IService
{
    public interface IInventoryService
    {
        /// <summary>
        /// 库存汇总查询
        /// </summary>
        /// <param name="whId"></param>
        /// <param name="aid"></param>
        /// <param name="mname"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<Inventory> GetInventoryGroupList(long? whId, long? aid, string? mname, int pageIndex, int pageSize,out int totalCount);
        /// <summary>
        /// 库存明细查询
        /// </summary>
        /// <param name="whId"></param>
        /// <param name="aid"></param>
        /// <param name="mname"></param>
        /// <param name="status"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<Inventory> GetInventoryDetailList(string? ModelSpec,string? StockName,string? mname, int status, int pageIndex, int pageSize , out int totalCount);

        /// <summary>
        /// 库区预警
        /// </summary>
        /// <param name="type"></param>
        /// <param name="wid"></param>
        /// <param name="aid"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<InventoryWarn> GetInventoryWarnList(int? type, long? wid,long aid,int pageIndex, int pageSize, out int totalCount);

        /// <summary>
        /// 根据物料编号查询满载率
        /// </summary>
        /// <param name="key"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<InventoryPalletDto> GetInventoryPalletDto(string? key, int pageIndex, int pageSize, out int totalCount);

        /// <summary>
        /// 根据物料编号查询满载率5
        /// </summary>
        /// <param name="key"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<InventoryPalletDto> GetInventoryPalletDto5(string? key, int pageIndex, int pageSize, out int totalCount);

        /// <summary>
        /// 拣选出库回流库存信息
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<InventoryPalletDto> GetPickingShippingOrderDetail(string? key, int pageIndex, int pageSize, out int totalCount);

        /// <summary>
        /// 修改库存状态为补货
        /// </summary>
        /// <param name="id"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        bool UpdInventoryStatus(long id,out string message);

        /// <summary>
        /// 明细导出
        /// </summary>
        /// <param name="aid"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        List<InventoryExport>? GetInventoryExport(long aid,int status);
    }
}
